package org.aldar.bquest.logic.controller.level;

import org.aldar.bquest.constants.LandscapeType;
import org.aldar.bquest.entity.AbilityTileSprite;
import org.aldar.bquest.entity.LandscapeArea;
import org.aldar.bquest.logic.GameTutorial;

import java.util.HashMap;
import java.util.Map;

import static org.aldar.bquest.constants.LandscapeType.*;
import static org.aldar.bquest.logic.GameTutorial.TutorialSection.*;

/**
 * User: Daria
 * Date: 9/22/14 12:23 PM
 */
public class LevelDefinition {

    public static LevelAreaDef[] getLevels() {
        return levels;
    }

    public static Map<String, LandscapeArea[]> levelDefs = new HashMap<String, LandscapeArea[]>();

    static {
        levelDefs.put("0_0", new LandscapeArea[]{l(GRAIN, 3), l(OAKS, 2, 0, 1), l(BLOSSOM_HILLS, 4, 1, 0), l(VILLAGE_GREY, 4, 2, 0), l(GRAIN, 3), li(OAKS, 1, 2), li(BLOSSOM_HILLS, 3, 1)});
        levelDefs.put("0_1", new LandscapeArea[]{li(BLOSSOM_HILLS, 3, 1), li(VILLAGE_GREY, 1, 0), l(GRAIN, 2), li(OAKS, 1, 0), l(GRAIN, 1), l(BLOSSOM_HILLS, 3, 1), li(VILLAGE_GREY, 2, 1), l(GRAIN, 1), li(VILLAGE_GREY, 1, 0), l(GRAIN, 2), l(OAKS, 3, 2, 1, 0), li(BLOSSOM_HILLS, 3, 1), li(VILLAGE_GREY, 1, 0), l(GRAIN, 1)});
        levelDefs.put("0_2", new LandscapeArea[]{l(GRAIN, 2), li(OAKS, 1, 2), l(TOWN, true, 1, 2, 2, 3), li(OAKS, 1, 1), li(BLOSSOM_HILLS, 3, 1), l(GRAIN, 1), l(TOWN, true, 3, 3, 1, 0), l(GRAIN, 2), l(OAKS, 2, 0, 1), l(TOWN, true, 1, 3, 3, 2, 3), l(OAKS, 2, 2, 0), li(BLOSSOM_HILLS, 3, 1)});
        levelDefs.put("0_3", new LandscapeArea[]{l(GRAIN, 1), li(OAKS, 1, 0), li(BLOSSOM_HILLS, 3, 1), l(GRAIN, 1), li(OAKS, 1, 1), l(GRAIN, 1), l(TOWN, true, 3, 5, 3, 2, 0, 3), l(GRAIN, 1), l(OAKS, 2, 0, 2), li(BLOSSOM_HILLS, 3, 1), li(OAKS, 1, 1), l(TOWN, true, 2, 2, 2, 3), li(OAKS, 1, 1), l(GRAIN, 2)});
        levelDefs.put("0_4", new LandscapeArea[]{l(GRAIN, 2), l(TOWN, true, 2, 2, 1, 3), l(GRAIN, 1), l(OAKS, 2, 0, 1), l(GRAIN, 1), li(BLOSSOM_HILLS, 3, 1), l(OAKS, 3, 2, 0, 1), l(GRAIN, 1), l(TOWN, true, 3, 2, 2, 3), li(BLOSSOM_HILLS, 3, 1)});
        levelDefs.put("0_5", new LandscapeArea[]{l(OAKS, 3, 0, 1, 2), l(TOWN, true, 1, 1, 2), l(GRAIN, 1), li(BLOSSOM_HILLS, 3, 1), li(VILLAGE_GREY, 1, 0), l(GRAIN, 3), l(TOWN, true, 2, 2, 1, 3), li(BLOSSOM_HILLS, 3, 1), l(OAKS, 2, 1, 2), li(VILLAGE_GREY, 1, 0), l(GRAIN, 1), l(TOWN, true, 2, 3, 3, 0), l(GRAIN, 1), li(OAKS, 1, 0)});

        levelDefs.put("1_0", new LandscapeArea[]{l(HILLS, 4, 0, 1), li(VILLAGE, 1, 0), li(PUMPKIN, 4, 2, 1, 0, 2), li(APPLE_TREES, 1, 1), li(VILLAGE, 3, 2), li(PUMPKIN, 1, 1), l(APPLE_TREES, 3, 0, 2, 1), li(VILLAGE, 2, 1), li(BUSHES, 3, 0, 0, 0)});
        levelDefs.put("1_1", new LandscapeArea[]{li(PUMPKIN, 2, 2, 1), l(TOWN, true, 2, 3, 3, 0), li(APPLE_TREES, 5, 2, 1, 0, 2, 0), li(VILLAGE, 4, 0, 1, 0), li(APPLE_TREES, 4, 0, 2, 1, 0), l(TOWN, true, 3, 3, 3, 2, 1), li(APPLE_TREES, 6, 1, 0, 1, 2, 1, 0)});
        levelDefs.put("1_2", new LandscapeArea[]{li(HILLS, 4, 1, 0), li(BUSHES, 1, 0), li(HILLS, 3, 1), li(BUSHES, 1, 0), li(HILLS, 1, 0), li(BUSHES, 3, 0, 0, 0), li(VILLAGE, 3, 2), li(BUSHES, 1, 0), li(HILLS, 3, 1), l(TOWN, true, 3, 3, 1, 0), li(HILLS, 4, 0, 1), l(TOWN, true, 2, 3, 3, 2, 3), li(BUSHES, 1, 0), li(HILLS, 1, 0)});
        levelDefs.put("1_3", new LandscapeArea[]{li(HILLS, 2, 0, 0), l(TOWN, true, 1, 3, 1, 3, 1), li(HILLS, 4, 0, 1), l(TOWN, true, 2, 4, 2, 0, 3), li(HILLS, 3, 1), l(TOWN, true, 3, 6, 1, 0, 2, 3, 1), li(HILLS, 3, 1), li(APPLE_TREES, 2, 0, 1)});
        levelDefs.put("1_4", new LandscapeArea[]{li(PUMPKIN, 4, 2, 1, 0, 2), li(BUSHES, 1, 0), l(TOWN, true, 1, 2, 3, 2), li(APPLE_TREES, 3, 0, 1, 2), li(BUSHES, 3, 0, 0, 0), li(APPLE_TREES, 2, 0, 1), l(TOWN, true, 1, 2, 3, 1), li(BUSHES, 2, 0, 0), li(PUMPKIN, 1, 1), li(BUSHES, 1, 0), l(TOWN, true, 1, 1, 2), li(HILLS, 4, 1, 0), l(TOWN, true, 2, 3, 1, 2, 3), li(PUMPKIN, 1, 0, 2)});
        levelDefs.put("1_5", new LandscapeArea[]{li(HILLS, 3, 1), l(TOWN, true, 1, 1, 1), li(PUMPKIN, 4, 2, 1, 0, 2), l(TOWN, true, 3, 4, 3, 0, 1), li(BUSHES, 3, 0, 0, 0), li(HILLS, 3, 1), l(TOWN, true, 1, 1, 3), li(HILLS, 3, 1)});

        //castle, hills, oaks, water, rock, town
        levelDefs.put("2_0", new LandscapeArea[]{li(OAKS, 4, 1, 0, 1, 2), li(HILLS, 1, 0), li(OAKS, 1, 0), l(CASTLE, true, 1, 2, 2), li(HILLS, 4, 0, 1), li(OAKS, 5, 0, 1, 2, 0, 1), l(TOWN, true, 3, 3, 2, 3, 1), li(HILLS, 3, 1), li(ROCK, 1, 0), li(HILLS, 1, 0), l(CASTLE, true, 1, 1, 1), li(ROCK, 4, 0, 1, 0)});
        levelDefs.put("2_1", new LandscapeArea[]{li(OAKS, 5, 0, 1, 2, 0, 1), l(TOWN, true, 1, 2, 1, 3), li(ROCK, 2, 1), li(HILLS, 1, 0), li(CASTLE, 3, 3), li(HILLS, 3, 1), l(TOWN, true, 2, 2, 2, 3), li(OAKS, 1, 0), li(HILLS, 2, 1), li(OAKS, 1, 1), l(TOWN, true, 2, 4, 3, 3, 0, 1), li(OAKS, 4, 2, 1, 0, 1)});
        levelDefs.put("2_2", new LandscapeArea[]{li(OAKS, 5, 0, 1, 2, 0, 1), l(TOWN, true, 2, 2, 1, 3), li(OAKS, 6, 1, 2, 0, 1, 2, 0), l(TOWN, true, 2, 2, 2, 1), li(OAKS, 4, 0, 1, 1, 0), l(TOWN, true, 1, 2, 0), li(OAKS, 4, 0, 1, 2, 1)});
        levelDefs.put("2_3", new LandscapeArea[]{li(OAKS, 4, 1, 0, 1, 2), li(HILLS, 3, 1), li(ROCK, 1, 0), l(CASTLE, true, 1, 2, 2), li(ROCK, 2, 1), l(CASTLE, true, 1, 1, 0), li(ROCK, 4, 0, 1, 0), l(TOWN, true, 3, 3, 2, 3, 1), li(ROCK, 3, 0, 1), li(HILLS, 3, 1), li(OAKS, 4, 1, 2, 0, 1)});
        levelDefs.put("2_4", new LandscapeArea[]{li(OAKS, 6, 1, 0, 1, 2, 1, 0), li(HILLS, 3, 1), l(CASTLE, true, 3, 7, 7), li(ROCK, 5, 0, 2), l(TOWN, true, 2, 3, 2, 3, 1), li(ROCK, 2, 1), li(OAKS, 4, 1, 2, 0, 1)});
        levelDefs.put("2_5", new LandscapeArea[]{li(OAKS, 2, 0, 1), li(HILLS, 10, 1, 1, 0, 1), li(CASTLE, 1, 1), l(TOWN, true, 2, 6, 3, 2, 1, 0, 3), li(CASTLE, 3, 0, 1), l(TOWN, true, 3, 6, 3, 0, 1, 2, 3), li(CASTLE, 1, 1), li(HILLS, 7, 1, 1, 0)});

        //forest_village, oaks, dark_forest, dark_water, rock, dead_forest
        levelDefs.put("3_0", new LandscapeArea[]{li(OAKS, 2, 1, 0), li(DEAD_FOREST, 2, 1, 2), li(OAKS, 2, 1, 0), l(FORESTVILLAGE, true, 2, 3, 0, 1), li(DARK_FOREST, 3, 0, 2, 1), li(ROCK, 2, 1), li(DEAD_FOREST, 2, 0, 1), li(DARK_FOREST, 2, 1, 2), l(FORESTVILLAGE, true, 3, 5, 2, 0, 1), li(DARK_FOREST, 2, 2, 1)});
        levelDefs.put("3_1", new LandscapeArea[]{li(DARK_FOREST, 3, 0, 2, 1), li(DEAD_FOREST, 1, 1), l(FORESTVILLAGE, true, 3, 5, 1, 0, 2), li(DEAD_FOREST, 1, 2), li(DARK_FOREST, 3, 0, 2, 1), li(DEAD_FOREST, 1, 1), li(DARK_FOREST, 1, 1), li(DEAD_FOREST, 1, 0), li(DARK_FOREST, 1, 2), li(DEAD_FOREST, 1, 2), l(FORESTVILLAGE, true, 2, 4, 0, 2, 0)});
        levelDefs.put("3_2", new LandscapeArea[]{li(DARK_FOREST, 3, 0, 2, 1), l(FORESTVILLAGE, true, 1, 1, 0), li(DEAD_FOREST, 3, 2, 1, 0), l(FORESTVILLAGE, true, 1, 2, 2), li(DARK_FOREST, 3, 0, 2, 1), li(DEAD_FOREST, 1, 1), l(FORESTVILLAGE, true, 1, 1, 0), li(DARK_FOREST, 2, 1, 2), li(OAKS, 1, 0), l(FORESTVILLAGE, true, 1, 1, 0), li(DARK_FOREST, 1, 1), li(OAKS, 2, 0, 2), l(FORESTVILLAGE, true, 1, 2, 2), li(DARK_FOREST, 2, 2, 1)});
        levelDefs.put("3_3", new LandscapeArea[]{li(DARK_FOREST, 3, 0, 2, 1), li(ROCK, 3, 1, 0), l(FORESTVILLAGE, true, 2, 3, 0, 2), li(DARK_FOREST, 4, 0, 2, 1, 0), l(FORESTVILLAGE, true, 3, 4, 0, 2, 0), li(ROCK, 4, 2), li(DARK_FOREST, 4, 0, 2, 1, 0)});
        levelDefs.put("3_4", new LandscapeArea[]{li(DARK_FOREST, 3, 0, 2, 1), li(DEAD_FOREST, 1, 1), li(ROCK, 2, 1), l(FORESTVILLAGE, true, 1, 1, 0), li(DARK_FOREST, 2, 0, 2), li(DEAD_FOREST, 1, 0), li(DARK_FOREST, 1, 0), l(FORESTVILLAGE, true, 3, 5, 0, 2, 1), li(ROCK, 3, 1, 0), l(FORESTVILLAGE, true, 1, 1, 0), li(DEAD_FOREST, 1, 2), li(DARK_FOREST, 4, 0, 2, 1, 0)});
        levelDefs.put("3_5", new LandscapeArea[]{li(DARK_FOREST, 0, 2, 1, 2), li(ROCK, 2, 1), l(FORESTVILLAGE, true, 1, 1, 0), li(ROCK, 4, 2), l(FORESTVILLAGE, true, 2, 3, 0, 1), li(ROCK, 3, 1, 0), li(DARK_FOREST, 2, 0, 2), l(FORESTVILLAGE, true, 2, 3, 0, 2), li(DARK_FOREST, 3, 2, 1, 0)});

        levelDefs.put("4_0", new LandscapeArea[]{li(DEAD_FOREST, 2, 1, 0), li(CEMETERY, 1, 1), l(TOWN_BLUE, true, 1, 1, 0), li(CEMETERY, 6, 1, 0, 2, 1, 2, 2), l(TOWN_BLUE, true, 3, 3, 2), li(CEMETERY, 2, 2, 1), li(DEAD_FOREST, 3, 1, 0, 2), l(TOWN_BLUE, true, 1, 1, 0), li(DEAD_FOREST, 1, 0)});
        levelDefs.put("4_1", new LandscapeArea[]{li(RUINS, 3, 2), l(TOWN_BLUE, true, 2, 2, 1), li(DARK_FOREST, 1, 2), li(CEMETERY, 1, 2), li(DARK_FOREST, 1, 0), li(RUINS, 3, 1, 0), l(TOWN_BLUE, true, 1, 1, 0), li(CEMETERY, 1, 2), li(DARK_FOREST, 1, 0), li(CEMETERY, 2, 1, 2), li(DARK_FOREST, 2, 2, 1), l(TOWN_BLUE, true, 2, 2, 1), li(RUINS, 5, 1, 2)});
        levelDefs.put("4_2", new LandscapeArea[]{li(RUINS, 8, 0, 1, 0, 2, 0), li(CEMETERY, 1, 2), li(DEAD_FOREST, 2, 2, 0), li(CEMETERY, 1, 2), l(TOWN_BLUE, true, 3, 5, 1, 0, 1), li(CEMETERY, 2, 0, 2), l(TOWN_BLUE, true, 2, 2, 1), li(CEMETERY, 1, 2), li(DEAD_FOREST, 1, 0), li(RUINS, 2, 1), li(CEMETERY, 1, 0), li(DEAD_FOREST, 1, 2), li(CEMETERY, 1, 1), li(DEAD_FOREST, 1, 0), li(CEMETERY, 1, 2)});
        levelDefs.put("4_3", new LandscapeArea[]{li(CEMETERY, 2, 1, 2), li(DEAD_FOREST, 1, 0), l(TOWN_BLUE, true, 1, 1, 0), li(CEMETERY, 3, 1, 0, 2), li(DEAD_FOREST, 2, 0, 2), li(CEMETERY, 1, 2), l(TOWN_BLUE, true, 1, 1, 0), li(CEMETERY, 1, 2), li(DEAD_FOREST, 1, 0), li(CEMETERY, 2, 0, 2), l(TOWN_BLUE, true, 1, 2, 1), li(DEAD_FOREST, 2, 0, 2), li(CEMETERY, 1, 2), li(DEAD_FOREST, 1, 0), l(TOWN_BLUE, true, 1, 1, 0), li(DEAD_FOREST, 1, 0), li(CEMETERY, 2, 2, 0), li(DEAD_FOREST, 1, 2), li(CEMETERY, 1, 0), l(TOWN_BLUE, true, 1, 1, 0), li(CEMETERY, 1, 2), li(DEAD_FOREST, 1, 0)});
        levelDefs.put("4_4", new LandscapeArea[]{li(DEAD_FOREST, 6, 2, 1, 0, 2, 1, 0), li(DARK_FOREST, 3, 0, 1, 2), l(TOWN_BLUE, true, 1, 1, 0), li(RUINS, 2, 1), li(CEMETERY, 2, 2, 1), l(TOWN_BLUE, true, 3, 2, 1), li(CEMETERY, 2, 1, 0), li(RUINS, 3, 2), l(TOWN_BLUE, true, 1, 1, 0), li(DARK_FOREST, 2, 1, 2), li(DEAD_FOREST, 6, 2, 1, 0, 2, 1, 0)});
        levelDefs.put("4_5", new LandscapeArea[]{li(DARK_FOREST, 3, 0, 2, 1), l(TOWN_BLUE, true, 2, 2, 1), li(DARK_FOREST, 8, 0, 2, 1, 0, 2, 0, 2, 1), l(TOWN_BLUE, true, 1, 1, 0), li(DARK_FOREST, 9, 1, 0, 2, 1, 2, 1, 0, 2, 1), l(TOWN_BLUE, true, 2, 2, 1), li(DARK_FOREST, 5, 0, 2, 1, 0, 2)});

        levelDefs.put("5_0", new LandscapeArea[]{li(DEAD_FOREST_LAVA, 3, 2, 1, 0), li(DARK_ROCKS, 3, 1, 0), l(TOWN_LAVA, true, 2, 3, 0, 2), li(DEAD_FOREST_LAVA, 4, 0, 2, 1, 0), li(DARK_ROCKS, 3, 2), li(CRATER, 2, 1), li(DARK_ROCKS, 2, 1), li(DEAD_FOREST_LAVA, 3, 2, 1, 0), l(TOWN_LAVA, true, 3, 5, 3, 0, 2), li(DEAD_FOREST_LAVA, 2, 1, 0)});
        levelDefs.put("5_1", new LandscapeArea[]{li(DARK_ROCKS, 1, 0), li(CRATER, 3, 0, 1), li(DARK_ROCKS, 3, 1, 0), l(TOWN_LAVA, true, 2, 3, 0, 2), li(DARK_ROCKS, 3, 2), li(CRATER, 3, 2), l(TOWN_LAVA, true, 1, 2, 1), li(CRATER, 3, 1, 0), li(DARK_ROCKS, 4, 2, 0), l(TOWN_LAVA, true, 2, 3, 2, 0), li(DARK_ROCKS, 2, 1)});
        levelDefs.put("5_2", new LandscapeArea[]{li(DARK_ROCKS, 2, 1), li(CRATER, 2, 1), li(DARK_ROCKS, 1, 0), l(TOWN_LAVA, true, 1, 1, 0), li(CRATER, 4, 0, 2), l(TOWN_LAVA, true, 1, 2, 2), li(CRATER, 2, 1), li(DEAD_FOREST_LAVA, 1, 0), li(DARK_ROCKS, 1, 0), l(TOWN_LAVA, true, 1, 2, 3), li(DEAD_FOREST_LAVA, 1, 0), li(DARK_ROCKS, 3, 2), li(DEAD_FOREST_LAVA, 1, 0), li(DARK_ROCKS, 1, 0), l(TOWN_LAVA, true, 2, 3, 0, 0, 0), li(DEAD_FOREST_LAVA, 1, 0), li(DARK_ROCKS, 2, 1)});
        levelDefs.put("5_3", new LandscapeArea[]{li(DARK_ROCKS, 3, 1, 0), l(TOWN_LAVA, true, 3, 4, 0, 3, 0), li(CRATER, 3, 2), li(DEAD_FOREST_LAVA, 2, 2, 1), li(IDOL, 2, 1), li(DEAD_FOREST_LAVA, 1, 0), li(IDOL, 5, 0, 2, 0), li(DEAD_FOREST_LAVA, 1, 0), li(IDOL, 2, 1), li(DEAD_FOREST_LAVA, 2, 2, 1), l(TOWN_LAVA, true, 2, 2, 3), li(DEAD_FOREST_LAVA, 1, 0), li(DARK_ROCKS, 2, 1)});
        levelDefs.put("5_4", new LandscapeArea[]{li(DEAD_FOREST_LAVA, 1, 0), li(IDOL, 5, 0, 2, 0), li(DEAD_FOREST_LAVA, 1, 0), li(IDOL, 4, 0, 1, 0), li(DEAD_FOREST_LAVA, 1, 0), l(TOWN_LAVA, true, 3, 6, 0, 3, 2, 0), li(DEAD_FOREST_LAVA, 1, 0), li(IDOL, 5, 0, 2, 0), li(DEAD_FOREST_LAVA, 1, 0), l(TOWN_LAVA, true, 2, 3, 2, 0), li(DEAD_FOREST_LAVA, 2, 0, 1)});
        levelDefs.put("5_5", new LandscapeArea[]{li(CRATER, 1, 0), l(TOWN_LAVA, true, 3, 3, 2, 0), li(CRATER, 10, 1, 0, 2, 0, 2), l(TOWN_LAVA, true, 2, 3, 0, 3), li(CRATER, 3, 1, 0)});

        levelDefs.put("6_0", new LandscapeArea[]{li(ROCKS_SWAMP, 1, 0), l(VILLAGE_SWAMP, true, 1, 1, 0), li(ROCKS_SWAMP, 4, 2), li(BUSHES_SWAMP, 2, 0, 0), li(DEAD_FOREST_SWAMP, 1, 1), l(VILLAGE_SWAMP, true, 3, 3, 2), li(DEAD_FOREST_SWAMP, 1, 2), li(CANE, 2, 1, 2), li(LILLY, 1, 0), l(VILLAGE_SWAMP, true, 1, 1, 0), li(ROCKS_SWAMP, 2, 1), li(LILLY, 1, 1)});
        levelDefs.put("6_1", new LandscapeArea[]{li(BUSHES_SWAMP, 2, 0, 0), li(LILLY, 2, 0, 1), li(CANE, 4, 2, 1, 0, 2), li(LILLY, 2, 1, 0), li(BUSHES_SWAMP, 1, 0), l(VILLAGE_SWAMP, true, 2, 1, 0), li(BUSHES_SWAMP, 1, 0), li(DEAD_FOREST_SWAMP, 1, 0), li(LILLY, 1, 1), li(BUSHES_SWAMP, 1, 0), li(LILLY, 1, 0), l(VILLAGE_SWAMP, true, 3, 2, 1), li(CANE, 1, 2), li(DEAD_FOREST_SWAMP, 1, 1), li(CANE, 1, 0), li(BUSHES_SWAMP, 1, 0), li(LILLY, 2, 0, 1)});
        levelDefs.put("6_2", new LandscapeArea[]{li(DEAD_FOREST_SWAMP, 3, 1, 0, 2), l(VILLAGE_SWAMP, true, 1, 2, 1), li(DEAD_FOREST_SWAMP, 1, 0), li(ROCKS_SWAMP, 4, 2), l(VILLAGE_SWAMP, true, 1, 1, 0), li(ROCKS_SWAMP, 1, 0), li(DEAD_FOREST_SWAMP, 2, 0, 1), li(ROCKS_SWAMP, 2, 1), li(DEAD_FOREST_SWAMP, 2, 1, 2), l(VILLAGE_SWAMP, true, 3, 3, 2), li(ROCKS_SWAMP, 1, 0), li(DEAD_FOREST_SWAMP, 3, 0, 1, 2)});
        levelDefs.put("6_3", new LandscapeArea[]{li(LILLY, 1, 0), li(CANE, 1, 2), li(LILLY, 1, 1), li(CANE, 1, 0), li(LILLY, 1, 0), li(CANE, 1, 1), li(LILLY, 1, 1), li(CANE, 3, 2, 0, 1), li(LILLY, 3, 1, 0, 1), li(ROCKS_SWAMP, 1, 0), li(LILLY, 1, 1), li(ROCKS_SWAMP, 2, 1), li(LILLY, 1, 1), li(CANE, 2, 2, 0)});
        levelDefs.put("6_4", new LandscapeArea[]{li(LILLY, 2, 0, 1), li(BUSHES_SWAMP, 3, 0, 0, 0), l(VILLAGE_SWAMP, true, 2, 4, 0, 2), li(BUSHES_SWAMP, 2, 0, 0), l(VILLAGE_SWAMP, true, 3, 5, 0, 1, 1), li(CANE, 2, 2, 0), li(LILLY, 2, 1, 1)});
        levelDefs.put("6_5", new LandscapeArea[]{li(LILLY, 4, 0, 1, 0, 1), li(CANE, 2, 2, 0), l(VILLAGE_SWAMP, true, 2, 1, 0), li(CANE, 2, 2, 1), li(LILLY, 4, 0, 1, 0, 1), li(MUSHROOMS, 1, 0), li(LILLY, 1, 1), li(MUSHROOMS, 2, 1, 2), l(VILLAGE_SWAMP, true, 3, 3, 2), li(MUSHROOMS, 1, 0), li(DEAD_FOREST_SWAMP, 4, 0, 1, 0, 2)});

        levelDefs.put("7_0", new LandscapeArea[]{li(DEAD_FOREST_MAGICLAND, 1, 0), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), li(IDOL_MAGICLAND, 2, 1), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), l(TOWN_MAGICLAND, true, 1, 1, 0), li(IDOL_MAGICLAND, 3, 2), l(TOWN_MAGICLAND, true, 3, 3, 2), l(IDOL_MAGICLAND, 4, 2, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), li(DEAD_FOREST_MAGICLAND, 1, 1)});
        levelDefs.put("7_1", new LandscapeArea[]{li(ROCKS_MAGICLAND, 2, 1), li(DEAD_FOREST_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 2, 2, 1), l(BLOSSOM_HILLS_MAGICLAND, 3, 1), li(ROCKS_MAGICLAND, 2, 1), l(TOWN_MAGICLAND, true, 1, 1, 0), li(ROCKS_MAGICLAND, 2, 1), li(DEAD_FOREST_MAGICLAND, 1, 1), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), l(TOWN_MAGICLAND, true, 2, 2, 1), li(DEAD_FOREST_MAGICLAND, 1, 2)});
        levelDefs.put("7_2", new LandscapeArea[]{li(BLOSSOM_HILLS_MAGICLAND, 3, 1), li(DEAD_FOREST_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(ROCKS_MAGICLAND, 4, 2), li(DEAD_FOREST_MAGICLAND, 1, 1), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), l(TOWN_MAGICLAND, true, 2, 2, 1), li(ROCKS_MAGICLAND, 2, 1), li(IDOL_MAGICLAND, 2, 1), l(TOWN_MAGICLAND, true, 1, 1, 0), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), li(ROCKS_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(BLOSSOM_HILLS_MAGICLAND, 3, 1), li(ROCKS_MAGICLAND, 2, 1)});
        levelDefs.put("7_3", new LandscapeArea[]{li(DEAD_FOREST_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(DEAD_FOREST_MAGICLAND, 1, 2), li(MUSHROOMS, 1, 2), li(DEAD_FOREST_MAGICLAND, 1, 1), li(MUSHROOMS, 1, 1), li(DEAD_FOREST_MAGICLAND, 1, 1), li(ROCKS_MAGICLAND, 1, 0), li(DEAD_FOREST_MAGICLAND, 1, 2), li(MUSHROOMS, 1, 2), li(DEAD_FOREST_MAGICLAND, 1, 1), li(MUSHROOMS, 1, 1), li(DEAD_FOREST_MAGICLAND, 1, 0), li(ROCKS_MAGICLAND, 6, 1, 2), l(TOWN_MAGICLAND, true, 3, 4, 0, 2), li(MUSHROOMS, 1, 2), li(DEAD_FOREST_MAGICLAND, 1, 1), li(ROCKS_MAGICLAND, 1, 0), li(DEAD_FOREST_MAGICLAND, 1, 0), li(MUSHROOMS, 1, 1), l(TOWN_MAGICLAND, true, 1, 2, 1)});
        levelDefs.put("7_4", new LandscapeArea[]{li(ROCKS_MAGICLAND, 1, 0), li(MUSHROOMS, 2, 0, 1), li(IDOL_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(IDOL_MAGICLAND, 1, 0), li(MUSHROOMS, 8, 2, 0, 1, 1, 0, 2, 1, 1), li(IDOL_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(IDOL_MAGICLAND, 1, 0), li(MUSHROOMS, 6, 2, 1, 0, 2, 0, 2), li(IDOL_MAGICLAND, 1, 0), l(TOWN_MAGICLAND, true, 1, 1, 0), li(IDOL_MAGICLAND, 1, 0), li(MUSHROOMS, 2, 1, 2), li(ROCKS_MAGICLAND, 1, 0), li(MUSHROOMS, 1, 0)});
        levelDefs.put("7_5", new LandscapeArea[]{li(MUSHROOMS, 6, 1, 0, 2, 1, 0, 2), l(TOWN_MAGICLAND, true, 3, 2, 1), li(MUSHROOMS, 2, 1, 2), li(IDOL_MAGICLAND, 13, 1, 0, 0, 0, 2, 0, 0, 0, 1), li(MUSHROOMS, 2, 0, 2), l(TOWN_MAGICLAND, true, 2, 2, 1), li(MUSHROOMS, 3, 2, 0, 1)});

    }

    public static LandscapeArea l(LandscapeType lsType, int length, int... indices) {
        return new LandscapeArea(lsType, length, indices);
    }

    public static LandscapeArea li(LandscapeType lsType, int length, int... indices) {
        return new LandscapeArea(lsType, length, indices);
    }

    public static LandscapeArea l(LandscapeType lsType, int length, int notes) {
        return new LandscapeArea(lsType, length, notes);
    }

    public static LandscapeArea l(LandscapeType lsType, boolean hasNotes, int notes, int length, int... indices) {
        return new LandscapeArea(lsType, hasNotes, notes, length, indices);
    }

    public static Map<String, GameTutorial.TutorialSection[]> tutorialStructure = new HashMap<String, GameTutorial.TutorialSection[]>();

    static {
        tutorialStructure.put(
                "0_0", new GameTutorial.TutorialSection[]{TUTORIAL_MAIN_GOAL});
        tutorialStructure.put(
                "0_1", new GameTutorial.TutorialSection[]{TUTORIAL_MAIN_GOAL, TUTORIAL_CRYSTAL_TILE});
        tutorialStructure.put(
                "0_2", new GameTutorial.TutorialSection[]{TUTORIAL_MAIN_GOAL, TUTORIAL_CRYSTAL_TILE, TUTORIAL_ABILITIES_MOVEHERO_CONCERT});
        tutorialStructure.put(
                "0_3", new GameTutorial.TutorialSection[]{TUTORIAL_MAIN_GOAL, TUTORIAL_CRYSTAL_TILE, TUTORIAL_ABILITIES_MOVEHERO_CONCERT, TUTORIAL_ABILITIES_EXPLODE9_COLLECT});
        tutorialStructure.put(
                "0_5", new GameTutorial.TutorialSection[]{TUTORIAL_MAIN_GOAL, TUTORIAL_CRYSTAL_TILE, TUTORIAL_ABILITIES_MOVEHERO_CONCERT, TUTORIAL_ABILITIES_EXPLODE9_COLLECT, TUTORIAL_ABILITY_TILE_MISSILE});
    }

    public static Map<String, AbilityTileSprite.AbilityType[]> abilityTypesByLevel = new HashMap<String, AbilityTileSprite.AbilityType[]>();

    static {
        abilityTypesByLevel.put("0_0", new AbilityTileSprite.AbilityType[]{});
        abilityTypesByLevel.put("0_1", new AbilityTileSprite.AbilityType[]{});
        abilityTypesByLevel.put("0_2", new AbilityTileSprite.AbilityType[]{AbilityTileSprite.AbilityType.MOVE_HERO});
        abilityTypesByLevel.put("0_3", new AbilityTileSprite.AbilityType[]{
                AbilityTileSprite.AbilityType.EXPLODE_9,
                AbilityTileSprite.AbilityType.MOVE_HERO,
                AbilityTileSprite.AbilityType.COLLECT_CRYSTALS});
    }

    public static Map<String, LandscapeType[]> lsTypesByLevel = new HashMap<String, LandscapeType[]>();

    //level types are restriced to first 2 levels because towns and concerts are not inroduced yet!
    static {
        lsTypesByLevel.put("0_0", new LandscapeType[]{BLOSSOM_HILLS, GRAIN, OAKS, VILLAGE_GREY, WATER});
        lsTypesByLevel.put("0_1", new LandscapeType[]{BLOSSOM_HILLS, GRAIN, OAKS, VILLAGE_GREY, WATER});

        //switching lstypes for set 1
        lsTypesByLevel.put("1_0", new LandscapeType[]{HILLS, TOWN, APPLE_TREES, BUSHES, VILLAGE, PUMPKIN, WATER});
        lsTypesByLevel.put("1_1", new LandscapeType[]{HILLS, TOWN, APPLE_TREES, VILLAGE, PUMPKIN, WATER});
        lsTypesByLevel.put("1_2", new LandscapeType[]{HILLS, TOWN, BUSHES, VILLAGE, PUMPKIN, WATER});
        lsTypesByLevel.put("1_3", new LandscapeType[]{HILLS, TOWN, APPLE_TREES, VILLAGE, PUMPKIN, WATER});
        lsTypesByLevel.put("1_4", new LandscapeType[]{HILLS, TOWN, APPLE_TREES, BUSHES, VILLAGE, PUMPKIN, WATER});
        lsTypesByLevel.put("1_5", new LandscapeType[]{HILLS, TOWN, BUSHES, VILLAGE, PUMPKIN, WATER});

    }

    public static Map<String, int[]> enemyIndicesByLevel = new HashMap<String, int[]>();

    static {
        enemyIndicesByLevel.put("0_4", new int[]{9});
        enemyIndicesByLevel.put("0_5", new int[]{10, 16});

        enemyIndicesByLevel.put("1_2", new int[]{8});
        enemyIndicesByLevel.put("1_3", new int[]{7, 14, 23});
        enemyIndicesByLevel.put("1_4", new int[]{11, 23});
        enemyIndicesByLevel.put("1_5", new int[]{3, 9, 18});

        enemyIndicesByLevel.put("2_0", new int[]{10, 21});
        enemyIndicesByLevel.put("2_1", new int[]{14, 20});
        enemyIndicesByLevel.put("2_2", new int[]{17});
        enemyIndicesByLevel.put("2_3", new int[]{6, 14, 22});
        enemyIndicesByLevel.put("2_4", new int[]{7, 17, 19});
        enemyIndicesByLevel.put("2_5", new int[]{6, 8, 10, 30, 32, 34});

        enemyIndicesByLevel.put("3_0", new int[]{6, 20});
        enemyIndicesByLevel.put("3_1", new int[]{6, 20});
        enemyIndicesByLevel.put("3_2", new int[]{3, 13, 21});
        enemyIndicesByLevel.put("3_3", new int[]{6, 8, 13, 15});
        enemyIndicesByLevel.put("3_4", new int[]{6, 12, 13, 14, 19});
        enemyIndicesByLevel.put("3_5", new int[]{2, 4, 12, 20});

        enemyIndicesByLevel.put("4_0", new int[]{6, 15});
        enemyIndicesByLevel.put("4_1", new int[]{2, 15, 21});
        enemyIndicesByLevel.put("4_2", new int[]{3, 5, 7});
        enemyIndicesByLevel.put("4_3", new int[]{6, 13, 23});
        enemyIndicesByLevel.put("4_4", new int[]{11, 12, 18, 19});
        enemyIndicesByLevel.put("4_5", new int[]{7, 10, 16, 18, 20});

        enemyIndicesByLevel.put("5_0", new int[]{15, 17, 19});
        enemyIndicesByLevel.put("5_1", new int[]{3, 14, 19});
        enemyIndicesByLevel.put("5_2", new int[]{3, 8, 25});
        enemyIndicesByLevel.put("5_3", new int[]{8, 15, 19});
        enemyIndicesByLevel.put("5_4", new int[]{5, 10, 19, 23});
        enemyIndicesByLevel.put("5_5", new int[]{5, 8, 12});

        enemyIndicesByLevel.put("6_0", new int[]{6});
        enemyIndicesByLevel.put("6_1", new int[]{3, 15});
        enemyIndicesByLevel.put("6_2", new int[]{7, 14});
        enemyIndicesByLevel.put("6_3", new int[]{6, 14});
        enemyIndicesByLevel.put("6_4", new int[]{});
        enemyIndicesByLevel.put("6_5", new int[]{22});

        enemyIndicesByLevel.put("7_0", new int[]{7, 18, 22});
        enemyIndicesByLevel.put("7_1", new int[]{6, 15});
        enemyIndicesByLevel.put("7_2", new int[]{1, 11, 21, 26});
        enemyIndicesByLevel.put("7_3", new int[]{7, 15, 25});
        enemyIndicesByLevel.put("7_4", new int[]{12, 20});
        enemyIndicesByLevel.put("7_5", new int[]{12, 13, 14, 18, 19, 20});

    }


    private static LevelAreaDef[] levels = new LevelAreaDef[]
            {
                    //HOME TOWN
                    //village_grey, blossom_hills, oaks, water, grain, town_red
                    new LevelAreaDef(0, null, 0, 0, 6, new float[]{187, 128},
                            new LandscapeType[]{BLOSSOM_HILLS, GRAIN, OAKS, VILLAGE_GREY, TOWN, WATER}, null),

                    //FARMLAND
                    //village, bushes/apple_trees, water, hills, pumpkin, town      
                    //!!!!!!!!!!! SEE lsTypesByLevel above!!!!!!!!!!!
                    new LevelAreaDef(1, 0, 50000, 15, 6, new float[]{321, 346},
                            new LandscapeType[]{HILLS, TOWN, APPLE_TREES, BUSHES, VILLAGE, PUMPKIN, WATER}, null),

                    //LIGHT FOREST
                    //castle, hills, oaks, water, rock, town
                    new LevelAreaDef(2, 1, 100000, 40, 6, new float[]{125, 463},
                            new LandscapeType[]{OAKS, CASTLE, TOWN, HILLS, WATER, ROCK}, null),

                    //DARK FOREST
                    //forest_village, oaks, dark_forest, dark_water, rock, dead_forest
                    new LevelAreaDef(3, 2, 100000, 65, 6, new float[]{280, 673},
                            new LandscapeType[]{FORESTVILLAGE, OAKS, DARK_FOREST, WATER, ROCK, DEAD_FOREST}, null),

                    //HORROR
                    new LevelAreaDef(4, 3, 150000, 90, 6, new float[]{153, 937},
                            new LandscapeType[]{CEMETERY, TOWN_BLUE, RUINS, WATER_GREEN, DEAD_FOREST, DARK_FOREST}, null),

                    //LAVA
                    new LevelAreaDef(5, 4, 150000, 115, 6, new float[]{339, 1137},
                            new LandscapeType[]{DARK_ROCKS, DEAD_FOREST_LAVA, TOWN_LAVA, CRATER, IDOL, LAVA}, null),

                    //SWAMPS
                    new LevelAreaDef(6, 5, 200000, 140, 6, new float[]{279, 1410},
                            new LandscapeType[]{DEAD_FOREST_SWAMP, CANE, VILLAGE_SWAMP, LILLY, ROCKS_SWAMP, BUSHES_SWAMP, WATER}, new LandscapeType[]{MUSHROOMS}),

                    //MAGICLAND
                    new LevelAreaDef(7, 6, 300000, 160, 6, new float[]{302, 1654},
                            new LandscapeType[]{ROCKS_MAGICLAND, BLOSSOM_HILLS_MAGICLAND, DEAD_FOREST_MAGICLAND, MUSHROOMS, IDOL_MAGICLAND, WATER, TOWN_MAGICLAND}, null)
            };

    private static LandscapeArea[] getLandscapesForLevel7() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(HILLS, 3),
                new LandscapeArea(ROCK, 4),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(ROCK, 2),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(HILLS, 6),
                new LandscapeArea(DARK_FOREST, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(ROCK, 6),
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(HILLS, 2),
                new LandscapeArea(GRAIN, 5),
        };
        return result;
    }

    private static LandscapeArea[] getLandscapesForLevel6() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(HILLS, 3),
                new LandscapeArea(TOWN, 4, 2),
                new LandscapeArea(ROCK, 4),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(ROCK, 2),
                new LandscapeArea(TOWN, 4, 2),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(HILLS, 6),
                new LandscapeArea(DARK_FOREST, 2),
                new LandscapeArea(TOWN, 6, 3),
                new LandscapeArea(ROCK, 6),
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(TOWN, 5, 3),
                new LandscapeArea(HILLS, 2),
                new LandscapeArea(GRAIN, 5),
        };
        return result;
    }

    private static LandscapeArea[] getLandscapesForLevel5() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(HILLS, 3),
                new LandscapeArea(ROCK, 4),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(ROCK, 2),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(HILLS, 6),
                new LandscapeArea(DARK_FOREST, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(ROCK, 6),
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(HILLS, 2),
                new LandscapeArea(GRAIN, 5),
        };
        return result;
    }

    private static LandscapeArea[] getLandscapesForLevel4() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(HILLS, 3),
                new LandscapeArea(ROCK, 4),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(ROCK, 2),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(HILLS, 6),
                new LandscapeArea(DARK_FOREST, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(ROCK, 6),
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(HILLS, 2),
                new LandscapeArea(GRAIN, 5),
        };
        return result;
    }

    private static LandscapeArea[] getLandscapesForLevel3() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(HILLS, 3),
                new LandscapeArea(ROCK, 4),
                new LandscapeArea(TOWN, 4, 3),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(ROCK, 2),
                new LandscapeArea(TOWN, 4, 2),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(HILLS, 6),
                new LandscapeArea(DARK_FOREST, 2),
                new LandscapeArea(ROCK, 6),
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(HILLS, 2),
                new LandscapeArea(GRAIN, 5),
        };
        return result;
    }

    private static LandscapeArea[] getLandscapesForLevel2() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(HILLS, 3),
                new LandscapeArea(ROCK, 4),
                new LandscapeArea(DARK_FOREST, 3),/*
                new LandscapeArea(ROCK, 2),
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(HILLS, 6),
                new LandscapeArea(DARK_FOREST, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(ROCK, 6),    */
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(TOWN, 4),
                new LandscapeArea(HILLS, 2),
                new LandscapeArea(GRAIN, 5),
        };
        return result;
    }

    private static LandscapeArea[] getLandscapesForLevel1() {
        LandscapeArea[] result = new LandscapeArea[]{
                new LandscapeArea(DARK_FOREST, 3),
                new LandscapeArea(TOWN, 5, 4),
                new LandscapeArea(GRAIN, 2),
                new LandscapeArea(DARK_FOREST, 5),
                new LandscapeArea(HILLS, 3),
        };
        return result;
    }

    public static Integer getLevelKey(Integer selectedLevelAreaIndex, Integer selectedLevelIndex) {
        return selectedLevelAreaIndex * 10 + selectedLevelIndex;
    }
}
